# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models

# Create your models here.
from django.db import models
from django.contrib.auth.models import AbstractUser
from django.conf import settings

class User(AbstractUser):
    resume = models.TextField(max_length=500, blank=True) #简历
    location = models.CharField(max_length=30, blank=True) #籍贯
    birth_date = models.DateField(null=True, blank=True)  #出生年月


class Article(models.Model):
    title = models.CharField(max_length=20,blank=False)
    content = models.TextField(max_length=500,blank=False)
    author = models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE)
    def __unicode__(self):
        return  self.title
